package com.example.jacksen.alldemo.Rxbus;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.example.jacksen.alldemo.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class Main2Activity extends AppCompatActivity {

    @BindView(R.id.edit)
    EditText edit;
    @BindView(R.id.btn)
    Button btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        ButterKnife.bind(this);
    }
    @OnClick(R.id.btn)
    public void onClick(){
        //发送事件
        RxBus.getInstance().post(new StudentEvent("007","小明"));
        Toast.makeText(this, "关闭", Toast.LENGTH_SHORT).show();
        finish();
    }

}
